package com.yqd.oop;

public class Person {
    String name;
    int age;
    String sex;

    public Person(String name, int age, String sex) {
        this.name = name;
        this.age = age;
        this.sex = sex;
    }

    @Override
    public String toString() {
        return "Person的信息是{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", sex='" + sex + '\'' +
                '}';
    }

    public static void main(String[] args) {
        Person zhangsan = new Person("张三",10,"女");
        System.out.println(zhangsan);
        System.out.println(zhangsan.name);
        System.out.println(zhangsan.age);
        System.out.println(zhangsan.sex);

        Student student = new Student("420322202312276319");
        System.out.println(student);
        System.out.println(student.getiDcard());
    }
}
